package com.szeldon.declatest.declaration.scenario.parts;

import com.szeldon.utils.ValuesUtils;

/**
 * Checkpoint part of scenario.
 * 
 * @author szeldon
 * 
 */
public class CheckpointPartDeclaration extends ScenarioPartDeclaration {

    private String description;
    private String id;

    /**
     * Creates checkpoint part with given id and description.
     * 
     * @param id
     * @param description
     */
    public CheckpointPartDeclaration(String id, String description) {
        this.id = ValuesUtils.checkNamedValueForNull("id", id);
        this.description = ValuesUtils.checkNamedValueForNull("description", description);
    }

    @Override
    public ScenarioPartsTypeEnum getPartType() {
        return ScenarioPartsTypeEnum.CHECKPOINT_PART;
    }

    public String getDescription() {
        return description;
    }

    public String getId() {
        return id;
    }

    @Override
    public boolean isCondition() {
        return false;
    }

    @Override
    public String toString() {
        return "Checkpoint id=" + id + "; description=" + description + ";";
    }

}
